package builder.annotation;

import lombok.Builder;
import lombok.ToString;

@Builder
@ToString
class Meal {
    private String burger;
    private String fries;
    private String drink;
}

class BuilderTest {
    public static void main(String[] args) {
        // 构建牛肉套餐
        Meal beefMeal = Meal.builder()
                .burger("牛肉汉堡")
                .fries("大份薯条")
                .drink("中杯可乐")
                .build();
        System.out.println("牛肉套餐：" + beefMeal);

        // 构建鸡肉套餐
        Meal chickenMeal = Meal.builder()
                .burger("鸡肉汉堡")
                .fries("中份薯条")
                .drink("大杯果汁")
                .build();
        System.out.println("鸡肉套餐：" + chickenMeal);
    }
}